	<div class="content_block">
		<div class="form_tbl" id="slides">
			
				<h1 style="padding: 16px 0px 16px 0px;">Danh sách quảng cáo</h1>
				<span class="border_d clearfix">
                		<table cellpadding="0" cellspacing="0" width="100%">
                        	<tr>
                            <td class="form_item" width="10" align="center">STT</td>
                            <td class="form_item" align="left">Tên quảng cáo</td>
                            <td class="form_item" align="left">Vị trí hiện thị</td>
                            <td class="form_item" align="center">Status</td>
                            <td class="form_item" width="120" align="center"></td>
                            </tr>
<?php
$arr	=	$db->database("adv_id,adv_name,adv_vitri,adv_stt,adv_status","adv","adv_id!=0 order by adv_stt ASC");
for($i=0;$i<count($arr);$i++) {
		if($arr[$i][4]==0)	$status	=	'<a href="index.php?ipos=adv&mode=status&num=1&ipid='.$arr[$i][0].'">Hiện</a>';
		if($arr[$i][4]==1)	$status	=	'<a class=\"no\" href="index.php?ipos=adv&mode=status&num=0&ipid='.$arr[$i][0].'">Ẩn</a>';
?>
                        	<tr>
                            <td class="form_item" width="10" align="center"><?=$arr[$i][4];?></td>
                            <td class="form_item" align="left"><?=$arr[$i][1];?></td>
                            <td class="form_item" align="left"><?=$arr[$i][2];?></td>
                            <td class="form_item" align="center"><?=$status;?></td>
                            <td class="form_item" width="120" align="center"><a href="index.php?ipos=adv&mode=edit&ipid=<?=$arr[$i][0];?>">Sửa</a> / <a href="index.php?ipos=adv&mode=delete&ipid=<?=$arr[$i][0];?>"  onClick="return ask()">Xóa</a></td>
                            </tr>
<? } ?>
                        </table>
				</span>

			</div>
		</div>
<script>
function ask(){
	if (confirm("Bạn có chắc chắn muốn xóa quảng cáo này")) return true;
	return false ;
}
</script>